@extends('home.user_left')

@section('right')
<link href="/home/css/appstyle.css" rel="stylesheet" type="text/css" />
<form action="/home/goods_comment/doadd" method="post">
	{{ csrf_field() }}
	<div class="user-comment">
		<!--标题 -->
		<div class="am-cf am-padding">
			<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">发表评论</strong> / <small>Make&nbsp;Comments</small></div>
		</div>
		<hr/>
		<div class="comment-main">
			<div class="comment-list">
				<div class="item-pic">
					<a href="#" class="J_MakePoint">
						<img src="images/comment.jpg_400x400.jpg" class="itempic">
					</a>
				</div>

				<div class="item-title">

					<div class="item-name">
						<a href="#">
							<p class="item-basic-info">美康粉黛醉美唇膏 持久保湿滋润防水不掉色</p>
						</a>
					</div>
					<div class="item-info">
						<div class="info-little">
							<span>颜色：洛阳牡丹</span>
							<span>包装：裸装</span>
						</div>
						<div class="item-price">
							价格：<strong>19.88元</strong>
						</div>										
					</div>
				</div>
				<div class="clear"></div>
				<div class="item-comment">
					<textarea placeholder="请写下对宝贝的感受吧，对他人帮助很大哦！" name="goods_comment_content"></textarea>
				</div>
				<div class="filePic">
					<input type="file" class="inputPic" allowexts="gif,jpeg,jpg,png,bmp" accept="image/*" >
					<span>晒照片(0/5)</span>
					<img src="images/image.jpg" alt="">
				</div>
				<div class="item-opinion">
					<li value="1"><i class="op1" ></i>好评</li>
					<li value="2"><i class="op2" ></i>中评</li>
					<li value="3"><i class="op3" ></i>差评</li>
				</div>
			</div>						
				<div class="info-btn">
					<!-- <div class="am-btn am-btn-danger">发表评论</div> -->
					<input type="submit" value="发表评论" class="am-btn am-btn-danger"> 
				</div>		
			<!-- 评论印象 -->
			<input type="hidden" name="goods_comment_grade" id="goods_comment_grade" value="">		
			<!-- 评论时间 -->
			<input type="hidden" name="goods_comment_content_time" id="goods_comment_content_time" value="{{ time() }}">		
			<!-- 模拟商品id  为1 -->
			<input type="hidden" name="goods_id" id="goods_id" value="1">
			<!-- 模拟用户id 为1278 -->
			<input type="hidden" name="user_id" id="user_id" value="1278">
	<script type="text/javascript">
		$(document).ready(function() {
			$(".comment-list .item-opinion li").click(function() {	
				$(this).prevAll().children('i').removeClass("active");
				$(this).nextAll().children('i').removeClass("active");
				$(this).children('i').addClass("active");
				// 将value值赋予隐藏域
				$('#goods_comment_grade').attr('value',$(this).attr('value'));
			});
     })
	</script>					
		
		</div>
	</div>
</form>
@endsection
